import { createRouter, createWebHistory } from 'vue-router';

import ListView from '../views/ListView.vue';

const router = createRouter({
    history: createWebHistory(), // 是个方法
    routes: [
        {
            path: '/',
            component: ListView
        }, 
        {
            path: '/List',
            component: ListView
        },
        {
            // path: '/User?id=:id',
            path: '/User/:id',
            component: () => import('../views/UserView.vue')
        }
    ]
})

export default router